home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / SINE-PUZ.dxr / 00077.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  4.1 KB  |  112 lines

  1. on enterFrame
  2.   global S6, S7, S8, S9, S10, S11, AA, AB, AC, BA, BB, BC, CA, CB, CC, DA, DB, DC
  3.   set xA to the left of sprite 6 + 1
  4.   set yA to the bottom of sprite 6 - 48
  5.   set A1 to value(char 1 of S6 & "A")
  6.   set B1 to value(char 1 of S6 & "B")
  7.   set C1 to value(char 1 of S6 & "C")
  8.   set A2 to value(char 2 of S6 & "A")
  9.   set B2 to value(char 2 of S6 & "B")
  10.   set C2 to value(char 2 of S6 & "C")
  11.   set the trails of sprite 27 to 1
  12.   repeat with n = 1 to 89
  13.     set x to n * 2.0 * PI / 180.0
  14.     set x1 to (n * 2) + xA
  15.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  16.     set the locH of sprite 27 to x1
  17.     set the locV of sprite 27 to y1
  18.     updateStage()
  19.   end repeat
  20.   set the trails of sprite 27 to 0
  21.   set xA to the left of sprite 7 + 1
  22.   set yA to the bottom of sprite 7 - 48
  23.   set A1 to value(char 1 of S7 & "A")
  24.   set B1 to value(char 1 of S7 & "B")
  25.   set C1 to value(char 1 of S7 & "C")
  26.   set A2 to value(char 2 of S7 & "A")
  27.   set B2 to value(char 2 of S7 & "B")
  28.   set C2 to value(char 2 of S7 & "C")
  29.   set the trails of sprite 28 to 1
  30.   repeat with n = 1 to 89
  31.     set x to n * 2.0 * PI / 180.0
  32.     set x1 to (n * 2) + xA
  33.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  34.     set the locH of sprite 28 to x1
  35.     set the locV of sprite 28 to y1
  36.     updateStage()
  37.   end repeat
  38.   set the trails of sprite 28 to 0
  39.   set xA to the left of sprite 8 + 1
  40.   set yA to the bottom of sprite 8 - 48
  41.   set A1 to value(char 1 of S8 & "A")
  42.   set B1 to value(char 1 of S8 & "B")
  43.   set C1 to value(char 1 of S8 & "C")
  44.   set A2 to value(char 2 of S8 & "A")
  45.   set B2 to value(char 2 of S8 & "B")
  46.   set C2 to value(char 2 of S8 & "C")
  47.   set the trails of sprite 29 to 1
  48.   repeat with n = 1 to 89
  49.     set x to n * 2.0 * PI / 180.0
  50.     set x1 to (n * 2) + xA
  51.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  52.     set the locH of sprite 29 to x1
  53.     set the locV of sprite 29 to y1
  54.     updateStage()
  55.   end repeat
  56.   set the trails of sprite 29 to 0
  57.   set xA to the left of sprite 9 + 1
  58.   set yA to the bottom of sprite 9 - 48
  59.   set A1 to value(char 1 of S9 & "A")
  60.   set B1 to value(char 1 of S9 & "B")
  61.   set C1 to value(char 1 of S9 & "C")
  62.   set A2 to value(char 2 of S9 & "A")
  63.   set B2 to value(char 2 of S9 & "B")
  64.   set C2 to value(char 2 of S9 & "C")
  65.   set the trails of sprite 30 to 1
  66.   repeat with n = 1 to 89
  67.     set x to n * 2.0 * PI / 180.0
  68.     set x1 to (n * 2) + xA
  69.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  70.     set the locH of sprite 30 to x1
  71.     set the locV of sprite 30 to y1
  72.     updateStage()
  73.   end repeat
  74.   set the trails of sprite 30 to 0
  75.   set xA to the left of sprite 10 + 1
  76.   set yA to the bottom of sprite 10 - 48
  77.   set A1 to value(char 1 of S10 & "A")
  78.   set B1 to value(char 1 of S10 & "B")
  79.   set C1 to value(char 1 of S10 & "C")
  80.   set A2 to value(char 2 of S10 & "A")
  81.   set B2 to value(char 2 of S10 & "B")
  82.   set C2 to value(char 2 of S10 & "C")
  83.   set the trails of sprite 31 to 1
  84.   repeat with n = 1 to 89
  85.     set x to n * 2.0 * PI / 180.0
  86.     set x1 to (n * 2) + xA
  87.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  88.     set the locH of sprite 31 to x1
  89.     set the locV of sprite 31 to y1
  90.     updateStage()
  91.   end repeat
  92.   set the trails of sprite 31 to 0
  93.   set xA to the left of sprite 11 + 1
  94.   set yA to the bottom of sprite 11 - 48
  95.   set A1 to value(char 1 of S11 & "A")
  96.   set B1 to value(char 1 of S11 & "B")
  97.   set C1 to value(char 1 of S11 & "C")
  98.   set A2 to value(char 2 of S11 & "A")
  99.   set B2 to value(char 2 of S11 & "B")
  100.   set C2 to value(char 2 of S11 & "C")
  101.   set the trails of sprite 32 to 1
  102.   repeat with n = 1 to 88
  103.     set x to n * 2.0 * PI / 180.0
  104.     set x1 to (n * 2) + xA
  105.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  106.     set the locH of sprite 32 to x1
  107.     set the locV of sprite 32 to y1
  108.     updateStage()
  109.   end repeat
  110.   set the trails of sprite 32 to 0
  111. end
  112.